
local lgraphics = love.graphics
quads = {}

function cImg()

	img = {}

	img.campo = lgraphics.newImage("resources/campo2.png")

	img.redcanasta = lgraphics.newImage("resources/redcanasta.png")
	img.marca = lgraphics.newImage("resources/marca.png")
	img.sscampo = lgraphics.newImage("resources/sscampo.png")
	img.ssJugMov = lgraphics.newImage("resources/SSjugadormovimiento.png")
	img.ssJugColision = lgraphics.newImage("resources/SSjugadormovimiento_colorchoque.png")
	img.ssJugPase = lgraphics.newImage("resources/SSjugadorpase.png")
	img.colision = lgraphics.newImage("resources/ouch.png")
	img.boton_statico = lgraphics.newImage("resources/boton0003.png")
	img.boton_tocado = lgraphics.newImage("resources/boton0002.png")
	img.boton_presionado = lgraphics.newImage("resources/boton0001.png")
	img.logo_loco = lgraphics.newImage("resources/Logo_loco_2.png")
	img.basketball2 =  lgraphics.newImage("resources/BasketBALL2.png")
	img.font = lgraphics.newImage("resources/fuente.png")
end

function quadsCreate()
	--newQuad( inicioX, inicioY, finalX, finalY, tamImgX, tamImgY )
	-- hacer una funcion que coja todas las imagenes de los spritesheet
	quads.title = lgraphics.newQuad(0,0,960, 640, 960, 640)
	quads.pm_static = lgraphics.newQuad(0, 64, 32, 32, 128, 128)
	quads.sombra = lgraphics.newQuad(4*16, 4*16, 16, 16, 96, 96)
	-- inicializamos los vectores
	quads.pm_der = {}
	quads.pm_izq = {}
	quads.pm_down = {}
	quads.pm_up = {}
	quads.logo = {}
	quads.fuent = {}
	-- introducimos los quads en los vectores corespondientes

	for i=0,11 do
		quads.logo[i] = lgraphics.newQuad(    23*i,0, 21, 25, 274, 25 )
		quads.logo[23-i] = lgraphics.newQuad( 23*i,0, 21, 25, 274, 25 )
	end

	for i=0,3 do
		quads.pm_der[i] = lgraphics.newQuad(   64*i ,0*64  , 64, 64, 64*4, 64*4 )
		quads.pm_izq[i] = lgraphics.newQuad(   64*i ,1*64  , 64, 64, 64*4, 64*4 )
		quads.pm_down[i] = lgraphics.newQuad(  64*i ,2*64  , 64, 64, 64*4, 64*4 )
		quads.pm_up[i] = lgraphics.newQuad(    64*i ,3*64  , 64, 64, 64*4, 64*4 )
	end


	
end

function setFont(  )
	font = love.graphics.newImageFont( img.font, " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.,:;0123456789ø?!><" )
	lgraphics.setFont( font )
end